{{ define "content" }}

<div class="nav-title">
    <div class="float-left fs14">
        <a href="/">{{.SiteCf.Name}}</a> &raquo; {{.Cobj.Name}} ({{.Cobj.Articles}})
        {{if ge .CurrentUser.Flag 99}}
        &nbsp;&nbsp;&nbsp; Hidden is {{.Cobj.Hidden}}• <a href="/admin/category/list?cid={{.Cobj.Id}}">编辑</a>
        {{end}}
    </div>
    {{if ge .CurrentUser.Flag 5}}
    <div class="float-right"><a href="/newpost/{{.Cobj.Id}}" class="newpostbtn">+发新帖</a></div>
    {{end}}
    <div class="c"></div>
</div>

<div class="main-box home-box-list">

    {{if .Cobj.About}}
    <div class="post-list grey"><p>{{.Cobj.About}}</p></div>
    {{end}}

    {{range $_, $item := .PageInfo.Items}}
    <div class="post-list">
        <div class="item-avatar">
            <a href="/member/{{$item.Uid}}"><img src="/static/avatar/{{$item.Avatar}}.jpg" alt="{{$item.Name}}" /></a>
        </div>
        <div class="item-content">
            <h1><a href="/t/{{$item.Id}}">{{$item.Title}}</a></h1>
            <span class="item-date"><a href="/n/{{$item.Cid}}">{{$item.Cname}}</a>  •  <a href="/member/{{$item.Uid}}">{{$item.Name}}</a>
                • {{$item.EditTimeFmt}}
                {{if $item.Comments}}
                 • 最后回复 <a href="/member/{{$item.Ruid}}">{{$item.Rname}}</a>
                {{end}}
            </span>
        </div>
        {{if $item.Comments}}
        <div class="item-count"><a href="/t/{{$item.Id}}#reply{{$item.Comments}}">{{$item.Comments}}</a></div>
        {{end}}
        <div class="c"></div>
    </div>

    {{end}}


    <div class="pagination">
        {{if .PageInfo.HasPrev}}
        <a href="/n/{{.Cobj.Id}}?btn=prev&key={{.PageInfo.FirstKey}}&score={{.PageInfo.FirstScore}}" class="float-left">&laquo; 上一页</a>
        {{end}}
        {{if .PageInfo.HasNext}}
        <a href="/n/{{.Cobj.Id}}?btn=next&key={{.PageInfo.LastKey}}&score={{.PageInfo.LastScore}}" class="float-right">下一页 &raquo;</a>
        {{end}}
        <div class="c"></div>
    </div>

</div>

{{ end}}

